//Date 2022.1.10

#include <stdio.h>
#include <stdlib.h>

int func(int num);

int main(void)
{
    int num;
    printf("Enter a number: ");
    scanf("%d", &num);
    printf("The number %d has %d digits\n", num, func(num));
    system("pause");
    return 0;
}

int func(int num)
{
    int amount = 0;
    while (num != 0)
    {
        num = num / 10;
        amount++;
    }
    return amount;
}